//
//  CXYChatViewController.swift
//  诚叙缘
//
//  Created by sujeking on 17/4/18.
//  Copyright © 2017年 szw. All rights reserved.
//

import UIKit

class CXYChatViewController: CXYBaseTableViewController {

    var msgs:Array<String> = Array()
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    
    override func setupUI() {
        super.setupUI()
        let nib = UINib(nibName: "CXYChatCell", bundle: nil)
        self.tableView.register(nib, forCellReuseIdentifier: "CXYChatCell")
    }
    
}

extension CXYChatViewController {
    override func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10
//        self.msgs.count;
    }
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "CXYChatCell", for: indexPath) as! CXYChatCell
        cell.contentLabel.text = String(indexPath.row)//String(self.msgs[indexPath.row])
        return cell;
    }
    
    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 84
    }
}
